|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
Freescale Semiconductor, Inc. Order this document by EB311/D Semiconductor Products Sector Engineering Bulletin EB311 Freescale Semiconductor, Inc... In-Circuit Programming of FLASH Memory Using the Monitor Mode for the MC68HC908SR12 By Timothy J. Airaudi Applications Engineering, Microcontroller Division Austin, Texas Introduction This engineering bulletin describes how to perform in-circuit programming (ICP) of the FLASH memory using monitor mode for the MC68HC908SR12. Two ICP methods are discussed here: * * Using the M68ICS08SR in-circuit simulator (ICS) with P&E Microcomputer Systems software Using P&E Microcomputer Systems software with an external communications circuit ICP is a process where user code is programmed into the device's FLASH memory after the part has been assembled into the application. ICP also allows the original users code to be erased and re-programmed. This method can be used in development, production/manufacturing, and in a field environment. P&E is a trademark of P&E Microcomputer Systems, Inc. (c) Motorola, Inc., 2001 TM For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. Engineering Bulletin Using Monitor Mode for FLASH Programming Motorola's current solution for ICP is the in-circuit simulators and P&E's software. The software and ICS allow programming of the parts on the simulator or in the target circuit via a MON08 ribbon cable. The software also allows programming of the part, without the ICS, by using an external communications circuit. Freescale Semiconductor, Inc... All the programming described here is accomplished by placing the part into monitor mode. In this mode, erasing and programming are done through a single-wire interface with the host computer. The two ways to enter monitor mode are: * The ICS provides the entry requirements into standard monitor mode. These entry requirements must be implemented on the target board if the ICS is not used. A second way to enter monitor mode, that does not require a high voltage on the IRQ1 pin, is forced monitor mode. This mode does not need to meet all the monitor mode entry conditions of the standard monitor mode, but it does require the part to be blank (erased). * This engineering bulletin describes how to connect the part, communicate at different baud rates, place the part into monitor mode, pass security, and erase and program the part. If the security code is not known, the contents of the FLASH can't be read, but the FLASH can be erased and reprogrammed. Information on the M68ICS08SR can be found at http://www.motorola.com/semiconductors, the company's Web site. P&E Microcomputer Systems software can be downloaded free from that company's Web site. NOTE: All of the oscillators used in this engineering bulletin are the 4-pin "powered" or "canned" type oscillators. Discussing all the different vendors of crystals, ceramic oscillators, other required external components, and component layout variables would be too extensive. EB311 2 For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Engineering Bulletin Using Monitor Mode for FLASH Programming ICP Using M68ICS08SR's MON08 Interface Use this procedure for performing ICP using the ICS's MON08 cable to the target application. 1. Materials required: a. PC with P&E's software installed b. M68ICS08SR ICS c. Adapter/connector to connect the female end of the MON08 cable to the target application Freescale Semiconductor, Inc... d. Pin assignment diagram (see Figure 1 and Figure 2) e. Monitor mode entry requirements (see Table 1) f. Crystal oscillator on the target or from an external clock source with a value from Table 2 g. Target board must have the ability to perform a power-on reset (POR) not just a reset (required to enter monitor mode). 2. Connections (see Figure 3): a. 9-pin serial cable from PC to the ICS b. 5 volts to the ICS c. MON08 cable (even pins) from J3 of the ICS to the target board with these connections: - MON08 GND to the VSS pin on the part - MON08 RST to the RST pin on the part - MON08 IRQ to the IRQ1 pin on the part - MON08 PTA0 to the PTA0 pin on the part - MON08 PTA2 to the PTA2 pin on the part - MON08 PTA1 to the PTA1 pin on the part - MON08 PTC1 to the PTC1 pin on the part d. It is assumed that all VDD and VSS pins on the part are already connected. 3. Operation -- Standard monitor mode entry: a. Launch P&E's WINIDE in the ICS08SRZ software. b. Open desired file. (Demo file can be used for testing purposes.) EB311 MOTOROLA For More Information On This Product, Go to: www.freescale.com 3 Freescale Semiconductor, Inc. Engineering Bulletin c. Assemble/Compile the file (see Figure 7). d. Plug in power to the ICS. e. Apply power to the target. f. Launch the programmer. Freescale Semiconductor, Inc... g. From "Target Hardware Type," select "Class II" (see Figure 8). If this window does not appear and the window in Figure 9 appears instead, you should relaunch the programmer without applying power to the target. You may want to check the "Show this dialog before attempting to contact the target 68HC08 board." h. From "PC Serial Port Configuration," select the PC port you are using and the appropriate baud rate (see Table 2). i. j. k. l. From "Target MCU Security Bytes," select appropriate security code (blank part = FF). Select "Contact Target with these Settings..." Follow the instructions in the "Power Down/Up Dialog" windows. Select appropriate algorithm for the part. The high-speed algorithm will not work at 14.4 and 28.8 kbaud. m. Double click on "Erase Module" - EM (see Figure 9). n. Double click on "Program Module" - PM. o. Record security bytes. This information can be seen by quitting and then re-entering the programmer. The S19 record will have the same security bytes as the part just programmed as long as it is not changed. The security bytes consist of the information stored in the interrupt vectors, $FFF6-$FFFD. 4. Operation -- Forced monitor mode entry: Forced monitor mode is not supported by this ICS. However, this mode can be entered by using the procedure found in ICP Using the External Communications Circuit (No ICS). EB311 4 For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Engineering Bulletin Using Monitor Mode for FLASH Programming ICP Using the External Communications Circuit (No ICS) Use this procedure for performing ICP via an external communications circuit in place of this ICS to the target application. 1. Materials required: a. PC with P&E software installed b. Adapter/connector to connect the male end of the 9-pin serial cable to the target application c. The external communications circuit. Also needed is a 5-volt power source to power this circuit (see Figure 4, Figure 5, and Figure 6). Freescale Semiconductor, Inc... d. Pin assignment diagram (see Figure 1 and Figure 2) e. Monitor mode entry requirements (see Table 1) f. Crystal oscillator on the target or from an external clock source, with a value from Table 2. If the crystal oscillator in the target application is not a value listed in Table 2, it may be possible to "overdrive" the target crystal with an external clock. An example of this would be overdriving a target's 32.768-kHz crystal with a 9.8304-MHz external clock. g. Target board must have the ability to perform a POR not just a reset of the part (required to enter monitor mode). 2. Connections (see Figure 4): a. 9-pin serial cable from PC to the external communications circuit b. V+ pin of the RS-232 part to the IRQ1 pin of the part c. Communication pin of HC125 to PTA0 of the part d. Target pin requirements: - PTA2 of the part to VSS - PTA1 of the part to VDD via a pullup resistor - PTC1 of the part to VSS (crystal frequency / 2) or to VDD via a pullup resistor (crystal frequency / 4). See Table 2. - RESET has an internal pullup resistor. e. It is assumed that all VDD and VSS pins on the part are already connected. EB311 MOTOROLA For More Information On This Product, Go to: www.freescale.com 5 Freescale Semiconductor, Inc. Engineering Bulletin 3. Operation -- Standard monitor mode entry: a. Launch P&E's WINIDE in the ICS08SRZ software. b. Open desired file. (Demo file can be used for testing purposes.) c. Assemble/Compile the file (see Figure 7). d. Apply power to the external communications circuit. e. Turn on power to the target. Freescale Semiconductor, Inc... f. Launch the programmer. g. From "Target Hardware Type," select "Class III" (see Figure 8). h. From "PC Serial Port Configuration," select the PC port in use and the appropriate baud rate (Table 2). i. j. k. l. From "Target MCU Security Bytes," select appropriate security code (blank part = FF). Select "Contact Target with these Settings..." Follow the instructions in the "Power Cycle Dialog" window. Select appropriate algorithm for the part. The high-speed algorithm will not work at 14.4 and 28.8 kbaud. m. Double click on "Erase Module" - EM (see Figure 9). n. Double click on "Program Module" - PM. o. Record security bytes. This information can be seen by quitting and then re-entering the programmer. The S19 record will have the same security bytes as the part just programmed as long as it is not changed. The security bytes consist of the information stored in the interrupt vectors, $FFF6-$FFFD. EB311 6 For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Engineering Bulletin Using Monitor Mode for FLASH Programming 4. Operation -- Forced monitor mode entry: a. Blank part with oscillator value from Table 2 (divide-by-4 options). See Figure 5. If the crystal oscillator in the target application is not a value listed in Table 2, it is possible to "overdrive" the target crystal with an external clock for the short duration of the programming sequence. An example of this would be overdriving a target's 32.768-kHz crystal with a 9.8304-MHz external clock. Freescale Semiconductor, Inc... - Remove connection to the IRQ1 pin from V+ of the external communications circuit. - No connections to PTA1, PTA2, and PTC1 are necessary in this mode. - IRQ has an internal pullup resistor. - Follow steps in 3. Operation -- Standard Monitor Entry. b. Blank part with a 32.768-kHz oscillator. See Figure 6. - Connect the IRQ1 pin to VSS. - Follow steps in 3. Operation -- Standard Monitor Entry. - Note that external components are required on the CGMXFC pin, as the PLL will be used. Refer to the MC68HC908SR12 Technical Data, Motorola document order number MC68HC908SR12/D, for recommended component values. EB311 MOTOROLA For More Information On This Product, Go to: www.freescale.com 7 Freescale Semiconductor, Inc. Engineering Bulletin PTC5/ATD10 PTC6/ATD11 PTC4/ATD9 PTA5/ATD7 PTA4/ATD6 PTA3/ATD5 PTA2/ATD4 38 43 42 41 40 47 46 45 44 39 37 PTA1/ATD3 36 VREFH 48 CGMXFC VDDA VSSA PTC3/ATD8 1 NC PTD0/KBI0 2 3 4 5 6 7 8 9 10 11 NC 35 34 33 32 31 30 29 28 27 26 14 15 16 17 18 19 20 21 22 23 VREFL OPIN2/ATD1 PTC7/ATD12 PTA0/ATD2 VSSAM OPIN1/ATD0 PTB4/T2CH0 PTB5/T2CH1 PTB6/IRQ2 PTA6/T1CH0 25 PTD7/KBI7 Freescale Semiconductor, Inc... VDD OSC1 OSC2 VSS PTD1/KBI1 IRQ1 PTD2/KBI2 RST PTD3/KBI3 12 PTB0/SDA0 13 PTB2/SDA1/TxD PTB3/SCL1/RxD PTD4/KBI4 PTD5/KBI5 PTD6/KBI6 PTC1/PWM1 PC0/PWM0/CD PTC2/PWM2 NC: No connection Figure 1. 48-Pin LQFP Pin Assignments PTA7/T1CH1 PTB1/SCL0 NC 24 EB311 8 For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Engineering Bulletin Using Monitor Mode for FLASH Programming VDDA PTC5/ATD10 PTC4/ATD9 PTA5/ATD7 CGMXFC PTC3/ATD8 PTD0/KBI0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 VSSA PTA4/ATD6 PTA3/ATD5 PTA2/ATD4 PTA1/ATD3 VREFH VREFL PTA0/ATD2 VSSAM OPIN1/ATD0 PTB4/T2CH0 PTB5/T2CH1 PTB6/IRQ2 PTA6/T1CH0 PTD7/KBI7 PTA7/T1CH1 PTC2/PWM2 PTC1/PWM1 PC0/PWM0/CD PTD6/KBI6 PTD5/KBI5 Freescale Semiconductor, Inc... VDD OSC1 OSC2 VSS PTD1/KBI1 IRQ1 PTD2/KBI2 RST PTD3/KBI3 PTB0/SDA0 PTB1/SCL0 PTB2/SDA1/TxD PTB3/SCL1/RxD PTD4/KBI4 Pins Not Available on 42-Pin Package OPIN2/ATD1 PTC6/ATD11 PTC7/ATD12 Internal Connection Unconnected Unconnected Unconnected Figure 2. 42-Pin SDIP Pin Assignments EB311 MOTOROLA For More Information On This Product, Go to: www.freescale.com 9 Freescale Semiconductor, Inc... r Engineering Bulletin 10 Table 1. Monitor Mode Signal Requirements and Options PTA2 (1) IRQ1 RST Address $FFFE/ $FFFF PTA1 PTA0 PTC1 PLL COP Comment External Clock(2) Bus Frequency Baud Rate X X X X X X 0 X Disabled 0 No operation until reset goes high X GND VTST VDD or VTST X 0 1 1 0 4.9152 MHz OFF Disabled 2.4576 MHz 9600 PTA1 and PTA2 voltages only required if IRQ1 = VTST; PTC1 determines frequency divider VTST X 0 1 1 1 VDD or VTST 9.8304 MHz 2.4576 MHz OFF Disabled 9600 PTA1 and PTA2 voltages only required if IRQ1 = VTST; PTC1 determines frequency divider 2.4576 MHz OFF Disabled 9600 External frequency always / by 4 2.4576 MHz ON Disabled 9600 PLL enabled (BCS set) in monitor mode VDD X X 1 X VDD Blank "$FFFF" 9.8304 MHz Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com X X 1 X 32.768 kHz X X X X X X -- OFF Enabled X X X X X X -- OFF Enabled GND VDD Blank "$FFFF" VDD or GND VTST -- Enters user mode; will encounter illegal address reset -- Enters user mode VDD or GND VDD or VTST MOTOROLA NOTES: 1. PTA)=1 if serial communication; PTA) = 0 if parallel communication 2. External clock is derived by a 32.768-kHz crystal or a 4.9152/9.8304-MHz off-chip oscillator. EB311 Freescale Semiconductor, Inc. Engineering Bulletin Using Monitor Mode for FLASH Programming Table 2. Crystal Frequency vs. Baud Rate Divide-by-2 Option (PTC1 to Development Tool or VSS) Crystal Frequency (MHz) 2.4576 4.9152 7.3728 9.8304 Internal Bus Frequency (MHz) 1.2288 2.4576 3.6864 4.9152 7.3728 Divide-by-4 Option (PTC1 to VDD) 4.9152 9.8304 14.7456 19.6608 29.4912 1.2288 2.4576 3.6864 4.9152 7.3728 4800 9600 14,400 19,200 28,800 Baud Rate 4800 9600 14,400 19,200 28,800 Freescale Semiconductor, Inc... 14.7456 2 GND 4 RST 6 IRQ PC RS-232 ICS 8 NC 10 PTA0 12 PTA2 14 16 J3 PTA1 PTC1 VSS RST IRQ1 NC PTA0 PTA2 PTA1 PTC1 TARGET Figure 3. MC68HC908SR12 MON08 Connections EB311 MOTOROLA For More Information On This Product, Go to: www.freescale.com 11 Freescale Semiconductor, Inc. Engineering Bulletin VDD VTST RS-232 IRQ VDD PTA0 9600 BAUD HC125 GND PTC1 PTA1 Freescale Semiconductor, Inc... PTA2 9.8304 MHz * OPTIONAL OSC1 Figure 4. MC68HC908SR12 Standard Monitor Mode (9.8304 MHz) VDD VDD RS-232 IRQ VDD PTA0 9600 BAUD HC125 GND 9.8304 MHz * OPTIONAL OSC1 Figure 5. MC68HC908SR12 Forced Monitor Mode (9.8304 MHz) EB311 12 For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Engineering Bulletin Using Monitor Mode for FLASH Programming VDD GND RS-232 IRQ VDD PTA0 9600 BAUD HC125 GND Freescale Semiconductor, Inc... Figure 6. MC68HC908SR12 Forced Monitor Mode (32.768 kHz) Figure 7. P&E's WINIDE Window EB311 MOTOROLA For More Information On This Product, Go to: www.freescale.com 13 Freescale Semiconductor, Inc. Engineering Bulletin Freescale Semiconductor, Inc... Figure 8. P&E's Target and Security Window EB311 14 For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Engineering Bulletin Using Monitor Mode for FLASH Programming Freescale Semiconductor, Inc... Figure 9. P&E's Programmer Window EB311 MOTOROLA For More Information On This Product, Go to: www.freescale.com 15 Freescale Semiconductor, Inc. Engineering Bulletin REQUIRED NON-DISCLOSURE Freescale Semiconductor, Inc... AGREEMENT Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. "Typical" parameters which may be provided in Motorola data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including "Typicals" must be validated for each customer application by customer's technical experts. Motorola does not convey any license under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any such unintended or unauthorized application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part. Motorola and are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer. How to reach us: USA/EUROPE/Locations Not Listed: Motorola Literature Distribution; P.O. Box 5405, Denver, Colorado 80217. 1-303-675-2140 or 1-800-441-2447 JAPAN: Motorola Japan Ltd.; SPS, Technical Information Center, 3-20-1, Minami-Azabu, Minato-ku, Tokyo 106-8573 Japan. 81-3-3440-3569 ASIA/PACIFIC: Motorola Semiconductors H.K. Ltd.; Silicon Harbour Centre, 2 Dai King Street, Tai Po Industrial Estate, Tai Po, N.T., Hong Kong. 852-26668334 Technical Information Center: 1-800-521-6274 HOME PAGE: http://www.motorola.com/semiconductors/ (c) Motorola, Inc., 2001 EB311/D For More Information On This Product, Go to: www.freescale.com |
Price & Availability of EB311 |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |